<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>haoml: haoml::parser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">haoml
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehaoml.html">haoml</a></li><li class="navelem"><a class="el" href="classhaoml_1_1parser.html">parser</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classhaoml_1_1parser-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">haoml::parser Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa221757529e6bfd4ef7d331269be3168"><td class="memItemLeft" align="right" valign="top"><a id="aa221757529e6bfd4ef7d331269be3168"></a>
<a class="el" href="classhaoml_1_1parser.html">parser</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classhaoml_1_1parser.html">parser</a> &amp;pa)=delete</td></tr>
<tr class="separator:aa221757529e6bfd4ef7d331269be3168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d78c9c8f550e19a2af3f6d85dc70804"><td class="memItemLeft" align="right" valign="top">shared_ptr&lt; <a class="el" href="classhaoml_1_1table.html">table</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhaoml_1_1parser.html#a7d78c9c8f550e19a2af3f6d85dc70804">build</a> (const char *filename)</td></tr>
<tr class="separator:a7d78c9c8f550e19a2af3f6d85dc70804"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a693e773c4e931ccf221e49160a0da31f"><td class="memItemLeft" align="right" valign="top">shared_ptr&lt; <a class="el" href="classhaoml_1_1base.html">base</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhaoml_1_1parser.html#a693e773c4e931ccf221e49160a0da31f">parser_data</a> (string &amp;data, string &amp;annot, shared_ptr&lt; <a class="el" href="classhaoml_1_1base.html">base</a> &gt; &amp;base_ptr)</td></tr>
<tr class="separator:a693e773c4e931ccf221e49160a0da31f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a718e5676ecd5429cef52a06ba05ab296"><td class="memItemLeft" align="right" valign="top"><a id="a718e5676ecd5429cef52a06ba05ab296"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhaoml_1_1parser.html#a718e5676ecd5429cef52a06ba05ab296">strip</a> (string &amp;str)</td></tr>
<tr class="memdesc:a718e5676ecd5429cef52a06ba05ab296"><td class="mdescLeft">&#160;</td><td class="mdescRight">strip the space(' ') and tab('') of a string <br /></td></tr>
<tr class="separator:a718e5676ecd5429cef52a06ba05ab296"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac842277c99a5fae8cc1836b0748f5f85"><td class="memItemLeft" align="right" valign="top">vector&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhaoml_1_1parser.html#ac842277c99a5fae8cc1836b0748f5f85">split</a> (char delimit, const string &amp;str)</td></tr>
<tr class="separator:ac842277c99a5fae8cc1836b0748f5f85"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a7d78c9c8f550e19a2af3f6d85dc70804"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d78c9c8f550e19a2af3f6d85dc70804">&#9670;&nbsp;</a></span>build()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">shared_ptr&lt; <a class="el" href="classhaoml_1_1table.html">table</a> &gt; parser::build </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>parser and construct </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>the filename which should be parsed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a shared pointer of table, <pre class="fragment">        inside, if object is mapp, it will return shared_ptr&lt;mapp&gt; when use as_mapp()
                if object is arrayy, it will return shared_ptr&lt;arrayy&gt; when use as_arrayy()
                if object is null, it will return nullptr either use as_mapp() or as_arrayy()
</pre> </dd></dl>
<dl class="section see"><dt>See also</dt><dd>class <a class="el" href="classhaoml_1_1table.html">table</a> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">haoexception</td><td>: <a class="el" href="namespacehaoml.html#ae3c65e1120bebd2943bd5959a1733414af91ec15ddab2e0c740d311f7c4a6613a" title="file relevant exception code ">haoml_error_code::file_error</a> open file error </td></tr>
    <tr><td class="paramname">haoexception</td><td>: <a class="el" href="namespacehaoml.html#ae3c65e1120bebd2943bd5959a1733414a0f045e5fc756540d919108e3229df7cb" title="format relevant exception code ">haoml_error_code::format_error</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a693e773c4e931ccf221e49160a0da31f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a693e773c4e931ccf221e49160a0da31f">&#9670;&nbsp;</a></span>parser_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">shared_ptr&lt; <a class="el" href="classhaoml_1_1base.html">base</a> &gt; parser::parser_data </td>
          <td>(</td>
          <td class="paramtype">string &amp;&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string &amp;&#160;</td>
          <td class="paramname"><em>annot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">shared_ptr&lt; <a class="el" href="classhaoml_1_1base.html">base</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>base_ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>the first key character detemined the type of a line, if there is no '=' neither '|',<br />
then treat this line as '|' one </p>

</div>
</div>
<a id="ac842277c99a5fae8cc1836b0748f5f85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac842277c99a5fae8cc1836b0748f5f85">&#9670;&nbsp;</a></span>split()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; string &gt; parser::split </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>delimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>split a string which delimited by a specified delimiter </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">delimit</td><td>: delimiter </td></tr>
    <tr><td class="paramname">str</td><td>: raw string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a vector after split </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>haoml/<a class="el" href="haoml_8h_source.html">haoml.h</a></li>
<li>haoml/haoml.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
